package com.hyny.framework.platform.system.entity.vo;


import com.hyny.framework.platform.system.utils.enums.ChildOperateTypeEnum;
import com.hyny.framework.base.enums.YesOrNoEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 数据权限类型
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("数据权限类型")
public class DataPowerTypeVO {


    /**
     * 业务字段名称（关联表对应的字段）
     **/
    @ApiModelProperty(value="业务字段名称（数据库字段名）[user_id]",position=1)
    private String fieldName;
    /**
     * 业务字段显示名称
     */
    @ApiModelProperty(value="业务字段显示名称,[用户编号]",position=2)
    private String fieldTitle;

    /**
     * 子集处理类型 SELECT 下拉选择，QUERY模糊查询
     */
    @ApiModelProperty(value="子集查询方式,对应枚举：ChildOperateTypeEnum",notes = "com.hyny.framework.platform.system.utils.enums.ChildOperateTypeEnum",position=3)
    private ChildOperateTypeEnum childOperateType;
    /**
     * 子集 业务字段名称（关联表对应的字段）
     */
    @ApiModelProperty(value="子集业务字段名称，无需展示",position=4)
    private String childFieldName;
    /**
     * 结构名称
     */
    @ApiModelProperty(value="结构名称",position=5)
    private String structureName;


    /**
     * 本级别是否可选
     */
    @ApiModelProperty(value="本级别是否可选,对应枚举：YesOrNoEnum",notes = "com.hyny.framework.base.enums.YesOrNoEnum",position=6)
    private YesOrNoEnum isOptional;

    /**
     * 可选数据值
     */
    @ApiModelProperty(value="可选数据值",position=7)
    private List<DataPowerTypeDataVO> dataPowerTypeDataVOList;


    public DataPowerTypeVO setIsOptional(YesOrNoEnum isOptional) {
        this.isOptional = isOptional;
        return this;
    }

    public DataPowerTypeVO setFieldName(String fieldName) {
        this.fieldName = fieldName;
        return this;
    }

    public DataPowerTypeVO setFieldTitle(String fieldTitle) {
        this.fieldTitle = fieldTitle;
        return this;
    }

    public DataPowerTypeVO setChildOperateType(ChildOperateTypeEnum childOperateType) {
        this.childOperateType = childOperateType;
        return this;
    }

    public DataPowerTypeVO setChildFieldName(String childFieldName) {
        this.childFieldName = childFieldName;
        return this;
    }
    public DataPowerTypeVO setStructureName(String structureName) {
        this.structureName = structureName;
        return this;
    }

    public DataPowerTypeVO setDataPowerTypeDataVOList(List<DataPowerTypeDataVO> dataPowerTypeDataVOList) {
        this.dataPowerTypeDataVOList = dataPowerTypeDataVOList;
        return this;
    }
}
